import { spawn } from 'child_process'
import { join } from 'path'

const mjpg = join(process.env.HOME ? process.env.HOME : '/home/pi', 'mjpg-streamer/mjpg-streamer-experimental')
const mjpg_streamer = join(mjpg, 'mjpg_streamer')
const input_uvc = join(mjpg, 'input_uvc.so')
const output_http = join(mjpg, 'output_http.so')
export const www = join(mjpg, 'www')

export default function a() {
    // console.log(`${mjpg_streamer} -i ${input_uvc} -o ${output_http}`)
    return spawn(mjpg_streamer, ['-i', input_uvc, '-o', output_http])
}




